using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class ap_pymtdecrMap : EntityTypeConfiguration<ap_pymtdecr>
    {
        public ap_pymtdecrMap()
        {
            // Primary Key
            this.HasKey(t => t.type);

            // Properties
            this.Property(t => t.reference)
                .HasMaxLength(6);

            this.Property(t => t.type)
                .IsRequired()
                .HasMaxLength(2);

            // Table & Column Mappings
            this.ToTable("ap_pymtdecr");
            this.Property(t => t.reference).HasColumnName("reference");
            this.Property(t => t.type).HasColumnName("type");
            this.Property(t => t.amt).HasColumnName("amt");
            this.Property(t => t.amtdol).HasColumnName("amtdol");
            this.Property(t => t.amtvend).HasColumnName("amtvend");
        }
    }
}
